<template>
  <div class="clear-btn-wrap">
    <el-button class="clear-btn-style" type="text" size="small" @click="handleClear">
      清空
      <img :src="clearIcon" class="clear-icon" alt="clear">
    </el-button>
  </div>
</template>
<script>
import clearIcon from '@/assets/medium/clear.png';
export default {
  name: 'ClearBtn',
  data() {
    return {
      clearIcon
    };
  },
  methods: {
    handleClear() {
      this.$emit('click');
    }
  }
};
</script>
<style lang="scss">
.clear-btn-wrap {
  display: inline;
  .clear-btn-style {
    font-size: 14px;
    font-weight: 400;
    color: #333333;
    line-height: 14px;
    width: auto;
    margin-right: 16px;
    margin-left: 10px;
    span {
      display: flex !important;
      align-items: center !important;
    }
    .clear-icon {
      width: 16px;
      height: 16px;
      margin-left: 2px;
    }
  }
}
</style>
